﻿using System.ServiceModel;
using Maxleaf.EDI.API.Contract.Faults;
using Maxleaf.EDI.API.Contract.Admin.Parameters;
using Maxleaf.EDI.API.Contract.Admin.Commands;

namespace Maxleaf.EDI.API.Contract
{
    [ServiceContract]
    public interface IAdminService
    {
        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        AuthenticateResult Authenticate(AuthenticateParameters parameters);

        [OperationContract]
        [FaultContract(typeof(UserAlreadyExistFault))]
        [FaultContract(typeof(GeneralFault))]
        void CreateUser(CreateUserCommand command);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        void ResetPassword(ResetPasswordCommand command);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        GetAllUsersResult GetAllUsers(GetAllUsersParameters parameters);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        GetAllDBsResult GetAllDBs(GetAllDBsParameters parameters);

        [OperationContract]
        [FaultContract(typeof(GeneralFault))]
        void SetDBAccess(SetDBAccessCommand command);
    }
}
